/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef LAYERNORM_CUSTOM_TILING_H
#define LAYERNORM_CUSTOM_TILING_H

#include "acl/acl.h"

void LayerNorm_do(uint32_t blockDim, aclrtStream stream,
                  uint8_t* x, uint8_t* gamma, uint8_t* beta,
                  uint8_t* res_out, uint8_t* workspace, uint8_t* tiling);

struct LayerNormTilingData {
    uint32_t rowNum;
    uint32_t rowNumSp;
    uint32_t rowLength;
    uint32_t blockPivot;
    uint32_t tileLoop;
    uint32_t tileLength;
    uint32_t loopCount;
    float factor;
    float mfactor;
    float eps;
};

#endif // LAYERNORM_CUSTOM_H
